<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title');
            $table->longText('html_content')->comment('转义内容');
            $table->longText('origin_content')->comment('原始内容');
            $table->smallInteger('status')->comment('状态');
            $table->integer('t_id')->comment('类别ID');
            $table->string('origin',200)->comment('来源');
            $table->smallInteger('is_share')->comment('是否共享');
            $table->integer('published_at')->comment('发布时间');
            $table->string('remark',200)->comment('备注信息');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('articles');
    }
}
